|
|
|
|
|
|
|
Even though the drag-and-drop operation is supported by Visual Basic, only Level 3 supported controls can be used without writing any code. To see how the automatic process works, start a new project and place one text box on the form, setting both the OLEDRAGMODE and OLEDROPMODE properties to Automatic. Start the application and then start WordPad. |
|
|
|
|
|
|
|
|
Note WordPad is being used instead of NotePad because WordPad supports the OLE drag-and-drop methods, whereas NotePad does not. |
|
|
|
|
|
|
|
|
|
Select the default text in the text box, drag it to the WordPad work area, and drop it. You will see that the text is moved from your application to WordPad. Table 15.1 lists the controls included with Visual Basic and the level of OLE drag and drop that they support. |
|
|
|
|
| TABLE 15.1 VISUAL BASIC CONTROLS AND THEIR OLE DRAG AND DROP SUPPORT LEVELS. | | Level | Control | | Level 1 | Data | | Drive ListBox | | CheckBox | | CommandButton | | Frame | | Label | | OptionButton | | Level 2 | ComboBox | | Data-bound ComboBox | | Data-bound ListBox | | Directory ListBox | | File ListBox | | ListBox | | ListView | | TreeView | | Level 3 | Apex data-bound grid | | Image | | MaskedEditBox | | PictureBox | | RichTextBox | | TextBox |
|
|
|